#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
int main()
{
    int fd1 = open("file1.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666);
    int fd2 = open("file2.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666);
    int fd3 = open("file3.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666);
    int fd4 = open("flie4.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666);

    printf("stdin:%d\n", stdin->_fileno);
    printf("stdout:%d\n", stdout->_fileno);
    printf("stderr:%d\n", stderr->_fileno);
    printf("file1_df:%d\n", fd1);
    printf("file2_df:%d\n", fd2);
    printf("file3_df:%d\n", fd3);
    printf("file4_df:%d\n", fd4);

    close(fd1);
    close(fd2);
    close(fd3);
    close(fd4);
}
